import Layout from '@/layout'

const noticeRouter = {
  path: '/app/notice',
  component: Layout, // Parent router-view
  name: 'notice_mgr',
  meta: { title: '新闻公告', icon: 'auth', permissions: ['app:notice:getByPage'] },
  redirect: '/app/notice',
  children: [
    {
      path: 'list',
      component: () => import('@/views/app/notice/list'),
      name: 'notice_list',
      meta: { title: '新闻公告', permissions: ['app:notice:getByPage'] }
    },
    {
      path: 'add',
      component: () => import('@/views/app/notice/add'),
      name: 'notice_add',
      hidden: true,
      meta: { title: '新增新闻公告', permissions: ['auth:sysAuthRole:save'] }
    },
    {
      path: 'edit',
      component: () => import('@/views/app/notice/edit'),
      name: 'notice_edit',
      hidden: true,
      meta: { title: '编辑新闻公告', permissions: ['auth:sysAuthRole:save'] }
    },
    {
      path: 'view',
      component: () => import('@/views/app/notice/view'),
      name: 'notice_view',
      hidden: true,
      meta: { title: '新闻公告详情', permissions: ['auth:sysAuthRole:getById'] }
    }
  ]
}

export default noticeRouter
